package com.google.webmusic.ws;

import com.google.webmusic.util.JsonUtil;

public class Model<T> {
	/*
	 * is success
	 */
	private boolean s;
	/**
	 * fail message
	 */
	private String m;
	/*
	 * data section
	 */
	private T d;
	
	public Model(boolean s, String m, T d) {
		super();
		this.s = s;
		this.m = m;
		this.d = d;
	}
	
	public Model(boolean s, String m) {
		super();
		this.s = s;
		this.m = m;
	}
	
	public Model(boolean s, T d) {
		super();
		this.s = s;
		this.d = d;
	}

	public boolean isS() {
		return s;
	}
	public void setS(boolean s) {
		this.s = s;
	}
	public String getM() {
		return m;
	}
	public void setM(String m) {
		this.m = m;
	}
	public T getD() {
		return d;
	}
	public void setD(T d) {
		this.d = d;
	}
	public String toString() {
		return JsonUtil.toJson(this);
	}
}
